package com.m3958.logcollector.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.data.rest.core.annotation.RestResource;

import com.m3958.logcollector.domain.UcToken;

@RepositoryRestResource(collectionResourceRel = "uctokens", path = "uctokens")
public interface UcTokenRepository   extends JpaRepository<UcToken, Long>, UcTokenRepositoryCustom, JpaSpecificationExecutor<UcToken> {

    UcToken findByTk(String tk);

    @Override
    @RestResource(exported = false)
    public List<UcToken> findAll();

    @Override
    @RestResource(exported = false)
    public UcToken findOne(Long id);

    @Override
    @RestResource(exported = false)
    public <S extends UcToken> S save(S entity);
}
